#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    server=new QTcpServer(this);

    //连接之前禁用设置按钮
    ui->pushButtonSet->setEnabled(false);

    //启动服务器
    connect(ui->pushButton,SIGNAL(clicked()),
            this,SLOT(openServerSlot()));

}

Widget::~Widget()
{
    delete ui;
}
